// cookie 的存储 (名称， 值， 有效时间（天）)
export function saveCookie (cookieName, cookieValue, cookieDates) {
    var d = new Date();
    d.setDate(d.getDate()+cookieDates);
    document.cookie = cookieName+"="+cookieValue+";expires="+d.toGMTStrin()
}
// cookie的获取
export function getCookie (cookieName) {
  var cookieStr = unescape(document.cookie);
  var arr = cookieStr.split(';')
  var cookieValue = "";
  for(var i =0; i<arr.length; i++) {
    if(temp[0] == cookieName) {
      cookieValue = temp[1]
      break
    }
  }
  return cookieValue
}
// 删除cookie
export function removeCookie (cookieName) {
  document.cookie = encodeURIComponent(cookieName)+"=;expires="+new Date()
}